package com.sc.pattern.activeobjects;

/**
 * Created  on 2018/1/14.
 *
 * @author sc
 */
public final class ActiveObjectFactory {
    private ActiveObjectFactory(){

    }

    public static ActiveObject createActiveObject(){
        Servant servant = new Servant();
        ActivationQueue activationQueue = new ActivationQueue();
        ScheduleThread scheduleThread = new ScheduleThread(activationQueue);
        ActiveObjectProxy proxy = new ActiveObjectProxy(scheduleThread,servant);
        scheduleThread.start();
        return proxy;
    }
}
